Elon Musk's rocket firm has overtaken the retail and media empire in value after a surge in its share price.